package cn.xny.basic.util;

public class AjaxResult {

    private Boolean success=true;
    private String msg="操作成功";
    private Object obj;


    public AjaxResult() {

    }

    //链式语法的改造
    public static AjaxResult me(){
        return new AjaxResult();
    }
    public AjaxResult(Boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    public AjaxResult(Boolean success, String msg, Object obj) {
        this.success = success;
        this.msg = msg;
        this.obj = obj;
    }

    public Boolean getSuccess() {
        return success;
    }

    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public AjaxResult setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Object getObj() {
        return obj;
    }

    public AjaxResult setObj(Object obj) {
        this.obj = obj;
        return this;
    }
}
